import { post, get, _delete } from '@/utils/request'

export default {
  login: (params) => post('/auth/login', params), // 用户登录
  loginInfo: (params) => get('/system/user/getInfo', params), // 获取用户信息
  logout: (params) => _delete('/auth/logout', params), // 登出
  code: () => get('/code'), // 获取登录验证码
  download: (params) => get('/file/download', params, 'export'), // 下载
  getCallbackToken: (params) => get('/auth/login/callback', params), // sso单点登录：用回跳的code换取我们的token
  getSSOTOKEN: (params) => post('/auth/login/sso', params), // 单点-获取新的令牌
  getAuthorize: () => get('/auth/login/authorize'), // sso单点登录：获取跳转的url
  downloads: (params) => post('/file/downloads', params, 'export'), // 下载多文件
}
